home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / NETPROG.ZIP;1 / NETPROG.TAR / lib / spipe.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-17  |  280 b   |  14 lines

  1. /*
  2.  * Create an unnamed stream pipe.
  3.  */
  4.  
  5. #include    <sys/types.h>
  6. #include    <sys/socket.h>
  7.  
  8. int            /* returns 0 if all OK, -1 if error (with errno set) */
  9. s_pipe(fd)
  10. int    fd[2];        /* two file descriptors returned through here */
  11. {
  12.     return( socketpair(AF_UNIX, SOCK_STREAM, 0, fd) );
  13. }
  14.